package com.anolesoft.yr.mbus.prod.model.service.impl;

import com.anolesoft.yr.mbus.prod.model.mapper.ProdServiceValueMapper;
import com.anolesoft.yr.mbus.prod.model.service.ProdServiceValueService;
import com.anolesoft.yr.mbus.prod.model.vo.ProdServiceValueQueryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class ProdServiceValueServiceImpl implements ProdServiceValueService {

    @Autowired
    ProdServiceValueMapper prodServiceValueMapper;

    //根据主键查询产品服务项参数名称
    @Override
    public List<ProdServiceValueQueryVO> queryProdServiceValueValue(String uid) throws Exception {
        List<ProdServiceValueQueryVO> prodServiceValueQueryVOList = prodServiceValueMapper.queryProdServiceValueByUid2(uid);
        return prodServiceValueQueryVOList;
    }

    //根据主键查询服务项参数唯一数据
    @Override
    public Map<String, Object> queryProdServiceValueByUid(String uid) throws Exception {
        ProdServiceValueQueryVO prodServiceValueQueryVO = prodServiceValueMapper.queryProdServiceValueByUid3(uid);

        Map<String, Object> maps = new HashMap<String, Object>();
        maps.put("prodServiceValueQueryVO", prodServiceValueQueryVO);
        return maps;
    }

    //查询服务项参数
    @Override
    public List<ProdServiceValueQueryVO> queryProdServiceValue2(String serviceName) throws Exception {
        List<ProdServiceValueQueryVO> prodServiceValueQueryVOList = prodServiceValueMapper.queryProdServiceValue2(serviceName);
        return prodServiceValueQueryVOList;
    }

    //查询询盘回访服务报价单中服务级别
    @Override
    public List<ProdServiceValueQueryVO> queryProdServiceValue3() throws Exception {
        List<ProdServiceValueQueryVO> prodServiceValueQueryVOList = prodServiceValueMapper.queryProdServiceValue3();
        return prodServiceValueQueryVOList;
    }

}
